home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / +ORC / Orc pac 42B / HOWTO42.TXT < prev    next >
Text File  |  2000-05-25  |  82KB  |  1,608 lines

  1.  
  2.   (Hic sunt tabulae: Best viewed with good old Courier New 8)
  3.  
  4.  
  5.      Well well well, my dear friends, it's April, the "opening"
  6. month, when trees unfold and the womb of nature opens with young life...
  7. about time we start with the REAL work, and what I mean is that we
  8. begin damaging Microsoft interests... the real ones. I will therefore 
  9. teach you here how to crack Microsoft's ubiquitous "trial version 
  10. time protection".
  11.      The typical Micro$oft's trial limit (of three months) is a
  12. clever marketing approach per se: I'm speaking of the "trial" version
  13. of their programs that you are supposed to use and enjoy for 90 days,
  14. until a screen reminds you that you WILL not be able to use it any more, 
  15. coz the 90 days are over, please pay. Note the clever touch of  90 (instead 
  16. of 30) days: three months are more than enough to get you real hooked on a
  17. program, especially huge monstrosities of the complexity of MS overbloated
  18. applications... it's a much better period than the usual "30 days" 
  19. flavour that we find around in common shareware.
  20.      Since Micro$oft makes the bulk of its money from software
  21. sold to corporate executives, senior sparer and assorted yuppies, it
  22. suits us well to crack as first example of this lesson, Microsoft PROJECT,
  23. one of those ridiculous "yuppie" programs that allow you to "plan"
  24. and "schedule" an activity or a project of your "team"... as if we
  25. were all time-slaves like those idiots... besides I may as well use this
  26. crap to program the nice "activities" of my +HCU's cracking units :=)
  27.      I'm therefore cracking here the 90 days trial version of
  28. MSOFFICE WINDOWS PROJECT Version 4.1 of august 1995  which has the
  29. protection hidden inside the monstrous WINPROJ.EXE (4.240.896 bytes of
  30. overbloated bad programming). The error and protection messages dwell inside 
  31. winproj.DLG (overbloated dialogues of 1.179.822 bytes).
  32.      We'll begin with this somewhat "older" example of the ubiquitous 
  33. "MS-trial" protection scheme (from 1995), since, as I have already told 
  34. you elsewhere, the *history* and the *evolution* of protection schemes 
  35. are powerful additional WEAPONS, that a cracker can use to defeat
  36. more complex schemes that may not be so evident if you cannot recognise 
  37. their "physiognomy" at the first glance (or if you do not yet "feel" them :=) 
  38. We'll crack in this lesson a Microsoft program from 1994, another one from 
  39. 1995 (this first one) and two from 1997. I believe this should give you a 
  40. wide enough palette of MS-protections, and that with this knowledge you 
  41. should be able to crack every single piece of software Microsoft may throw 
  42. at you in the next couple of years (at least :=)
  43.      You'll see for instance that the "cmp eax,ecx" instruction
  44. at the heart of some of these MS-schemes is a constant characteristic,
  45. that you'll meet again and again, which differs from the typical "beggar off
  46. on bad flag ax" setting that the shareware authors usually use.
  47.  
  48. A SMALL THEORETHICAL DIGRESSION
  49. First of all, before entering the guts of MS-cracking, a small "theoretical" 
  50. digression.
  51. From a cracker's point of view, the new "trend" to give away full time 
  52. limited versions of a software packages is extremely interesting:
  53. once you defeat the time checking routines (... plural coz there may
  54. be much more than one inside the same program) your work is done and
  55. you'll immediately enjoy the full application. 
  56.      The reason behind this trend (from password to time-trial)
  57. is quite simple: password-serial number protections are useless on a Web
  58. which abounds with free pirated serial number listings (I saw one with 54.000
  59. different serial numbers-registration strings couples!) that anybody with
  60. intelligence level "amoeba" can easily find. I do not like serial number
  61. collectors: they do not teach anything, in my (admittely biased) opinion they
  62. just steal... fact is anyway, that the mere existence of such huge
  63. ready-made password listings has nuked any programmer's confidence in the
  64. serial/string protection approach (whose cracking techniques I have explained
  65. elsewhere in this tutorial), and this is the more true for "commercial"
  66. (i.e. "non toy") applications. 
  67.      You will find therefore, for big commercial application, the
  68. "Cinderella" protections (you may use this app for 30 days) or
  69. the "quiver" protections (you may use this app 30 times), or a combination of
  70. these two kinds, or a combination of both kinds PLUS the registration
  71. string/serial number protection method.
  72.      One of the (minor) problems for us nice crackers is that
  73. with this kind of protections we may have some surprises later on... i.e. you
  74. crack your target and it works fine... well past the date it should have
  75. been crippled upon, WHEN YOU SET this DATE INSIDE YOUR OS but -alas!- it stops
  76. miserably working WHEN THE REAL TIME "of the world" has passed that cap...
  77. this has to do with OTHER protections, checking randomly, for instance, the
  78. date of some UNRELATED FILES on your hard disk.
  79.      Obviously this does not concern us much... as soon as this
  80. happen we crack this "second level" protection scheme too, happily drinking
  81. another Martini-Wodka (use only Moskowskaja and add some Indian tonic
  82. Schweppes and a zest of lemon if you want to taste something
  83. that's really good) and forget the whole incident... but I had
  84. to mention it right now because I honestly DO NOT KNOW YET if
  85. some of the programs that I'll crack in these lessons do have or
  86. not such additional protections, nor have I the time to feel if
  87. there are other protections inside overbloated 5 million bytes
  88. horrors once I have already found the first (and maybe only) one,
  89. nor have I envy to wait 90 days just to see if something else
  90. snaps... should it happen (which I DO NOT believe, seen how
  91. primitive MS-protections look like) I'll then simply add the new
  92. crack to this section, we'll see.
  93. ---------------------------------------------
  94. Some elementary MUST KNOW when you crack time protections:
  95. Date and Time stamps in the root directory (old flavour)
  96.      The root directory (in DOS) is a simple table of 32-byte
  97. entries, defining each file on the root directory. Bytes 0-7 have
  98. the file name, 8-10 have the file extension, 11 hydes the
  99. attribute flags, 12-21 are at times used for other protection
  100. tricks, 22-23 have the *TIME* stamp, 24-25 have the *DATE* stamp,
  101. 26-27 the starting cluster number and 28-31 the file size.
  102.      The date and time stamps can record any date from January
  103. 1, 1980 through December 31, 2099. The time stamp is accurate to
  104. two seconds. The date and time stamps are each 2 byte values that
  105. are recorded by using the following equations:
  106.                DATE = DAY+64*MONTH+512*(YEAR-1980)
  107.                TIME = SECONDS/2+32*MINUTES+2048*HOURS
  108.      In the time entry, the hour occupies the first 5 bits, the
  109. minutes the next 6, and the second the last 5. The seconds are
  110. actually stored as the number of seconds divided by 2, so the
  111. clock is accurate to 2 seconds. In the date entry, the year
  112. (subtracted from 1980... that is 0x7bc) is stored in the first
  113. 7 bits, the month in the next 4 and the day in the last 5 bits.
  114. How do we recover these values? Here the commonest tricks:
  115. seconds   AND byte 22 with 11111; then multiply by 2
  116. Minutes   AND byte 23 with 111; then shift left 3 and
  117.           add byte 23 shifted right 5
  118. Hours          Shift byte 23 right 3
  119. Day       AND byte 24 with 11111
  120. Month          AND byte 25 with 1, Multiply by 8 and 
  121.           add byte 24 shifted right 5
  122. Year      Add byte 25 to 1980 (0x7cb) and shift right 1
  123.      I hope you have the intelligence to understand by yourself
  124. why these methods work... the point is that as soon as you see
  125. something like that going on in the code you are examining, you
  126. will know that they are fiddling with date or time stamps (may
  127. be necessary, for instance, in order to reset the date and time
  128. stamps of an opened file without leaving any trace behind).
  129.  
  130. How does a programmer fetch the date? He uses the _dos_getdate
  131. function.
  132. The _dos_getdate function uses system call 0x2A to get the
  133. current system date.  The date information is returned in a 
  134. dosdate_t structure pointed to by date.
  135. Synopsis:
  136. #include <dos.h>
  137. void _dos_getdate( struct dosdate_t *date );
  138.  
  139. struct dosdate_t {
  140.         unsigned char day;      /* 1-31 */
  141.         unsigned char month;    /* 1-12 */
  142.         unsigned short year;    /* 1980-2099 */
  143.         unsigned char dayofweek;/* 0-6 (0=Sunday) */
  144. };
  145.  
  146. -------------------------------------------------------
  147.  
  148. AND NOW RUB YOUR HANDS: TO WORK!
  149.      And now rub your hands: to work!   Fetch your copy of the
  150. time limited version of  Winproj.exe (you'll find it on the
  151. web... many magazines in Europe have published it on their cover
  152. CD at the beginning of this year... The one I use here is taken
  153. from a second-hand French magazine I found in Basel some time
  154. ago: PCMAG n.108)
  155. Well how do we proceed?
  156. As usual: Let's dead list everything (but you could get pretty
  157. quickly to the "hollow" point of your target through winice, is
  158. a matter of aesthetic choice, I prefer dead listing because it
  159. is more "relaxed" but you may use a combination of both
  160. approaches or whatever you like most).
  161.      First thing you notice is that the dead listing is HUGE:
  162. more than 50 megabytes of text. You'll need a good wordprocessor
  163. to handle that... Microsoft's last one, word version 7.0 does not
  164. even accept such files, but look! Word 2 (the old version of
  165. Word, 1992 vintage) does run them (almost) without problems (you
  166. would not -obviously- have such problems under dos or linux).
  167. It's quite ironic, I believe, that Word 7 cannot open such a
  168. file, but on the contrary Word 2 ('92 version!) is capable of
  169. doing it... this confirms what I always supposed: huge
  170. overbloated programming is getting worse and worse... humanity
  171. has probably already entered one of its many phases of decadence
  172. :=)
  173.  
  174. LET'S SURPRISE THE PROTECTION SCHEME FROM BEHIND
  175. We can get to the protection scheme of this target in many ways
  176. (and there are yet many more... almost as many as you fancy).
  177. Usually, to defeat these protections the traditional approach is
  178. to set the OS date past the trial period, run the target,
  179. individuate the nag screen as soon as it snaps, get the maximuml
  180. information about it (comprised its pixel dimensions) and then
  181. breakpoint it using some of these data) for instance (with
  182. winice) bpx on MessageBox (MessageBoxA to be exact). Remember
  183. that with Godot (Winice 3.0), you can use CONDITIONAL
  184. EXPRESSIONS! Say that the hwnd command gave you 09017E as handle
  185. for the nagscreen (this value will be different EVERY time you
  186. run your target), then you can selective breakpoint on it with:
  187.           :bpx MessageBoxA IF ((ESP->4) == 09017E)
  188. since all Win32 applications pass parameters on the stack
  189. entering a function and  the first parameter has a positive
  190. offset of 4 from the ESP register.
  191.  Then you track back to the responsible code and so on and so
  192. on... since the protectionists are aware of these obvious "weak"
  193. points in their schemes, their "defences" will be all
  194. concentrated on this "path" (encrypted date compares far away
  195. from the messagebox call, bogus jumps, fake routines etcetera)...
  196. they'll try to defer people reverse backtracing to the protection
  197. scheme from the nag screen. 
  198.      We will therefore hack our way to these protections sneaking
  199. in from more hidden, less used and and less obvious doors, like
  200. (in this example) GetLocalTime or (as we'll see later) through
  201. the various "Write and read" file routines (i.e. the _open,
  202. _lseek and _read routines that the protection schemes use to
  203. fetch from the registry (or from somewhere else) the encrypted
  204. date of installation. The point is to take our target's
  205. protection schemes by surprise, from "behind" :=)
  206.      OK: First of all... we have to do with a time protection,
  207. duh, therefore GetLocalTime is a first bait we can jolly use,
  208. let's see if we fish anything thattaway:
  209. ------------------------------------------------
  210. * Referenced by CALLs at Addresses:
  211. |:05024FBE, :05024FF0, :05035A05, :0506489C, :0511A2A4, 
  212. |:05167F6A, :05167FC1, :051F9E77, :05204C54, :05223F14, 
  213. |:05223F81, :05224013, :05271A72   
  214. |
  215. :05024E77 55              push ebp
  216. :05024E78 8BEC            mov ebp, esp
  217. :05024E7A 83EC10          sub esp, 00000010
  218. :05024E7D 8D45F0          lea eax, [ebp-10]
  219. :05024E80 50              push eax
  220. :05024E81 FF15905E3C05    Call dword ptr [053C5E90]          
  221. *GetLocalTime,(Kernel32-E2h) ;HERE!
  222. ------------------------------------------------
  223. PARAMETERS inside Windows' FUNCTIONS
  224. After this call the program must save the time parameters: for
  225. those of you that do not know anything, the typedef structure is
  226. the following one... (VERY IMPORTANT FOR TIME PROTECTIONS! Learn
  227. it by heart! It's used in many other various FileTime routines
  228. too):
  229. ------------------------------------------------
  230. WORD wYear
  231. WOED wMonth
  232. WORD wDayOfWeek
  233. WORD wDay
  234. WORD wHour
  235. WORD wMinute
  236. WORD wSecond
  237. WORD wMilliseconds
  238. ------------------------------------------------
  239. Why did we seek GetLocalTime? Because  the protectionists have
  240. to know somehow if the program run over the allowed time and,
  241. while there are many other methods to do this, one of the most
  242. simple is a check through good humble GetLocalTime... so we'll
  243. begin from here, ready to check all other possibilities only if
  244. we do not fish anything with this bait.
  245.  
  246. Examining the savings of the return values from this routine, as
  247. with many other time routines, you'll find in your dead listing
  248. something like this:
  249. ------------------------------------------------
  250. CALL [KERNEL32!GetLocalTime]
  251. mov  dx, [EBP-10] that's the year, will be something like
  252. 7CD=1997
  253. mov  dl, [EBP-0E] the month... lower part of a register is enough
  254. mov  al, [EBP-0C] that's the day of the week, ditto
  255. mov  al, [EBP-0A] that's the day
  256. mov  dl, [EBP-08] that's the hour
  257. mov  al, [EBP-06] that's the minute
  258. mov  dl, [EBP-04] that's the second
  259. and if somebody would care, you would have had also
  260. mov  dx, [EBP-02] that's the millisecond, but few time
  261. protections care for that (which is stupid to say the least,
  262. since so many ideas come immediately to the mind :=)
  263. ------------------------------------------------
  264.  
  265.      I said "something like" the above, but things could differ
  266. a little coz the count [EBP-xx] could be flawed by pushes and
  267. then you would have something like -say- the year in [EBP-34]
  268. and, accordingly, the month in [EBP-32] et cetera... anyway the
  269. SERIE will always be respected, therefore you could also crack
  270. these protection in a completely different (and easy) way, that
  271. good old +ORC will now let you glimpse... simply set a breakpoint
  272. on a user routine (study this part of winice documentation
  273. WELL... you'll be able to crack almost ANYTHING with your own
  274. breakpoint routines)... say when the target loads for instance
  275. 7D5h on ax OR on dx (you will not know which of both registers
  276. the protection scheme use).. then simply run the program with the
  277. changed os date 2005 (which is 7D5h) and see what happens...
  278. you'll breakpoint smack in the middle of the protection scheme
  279. :=)... Why use 2005 instead of 1997? Easy: we wont use the
  280. current year (7CD=1997) nor the next couple of years, because the
  281. protectionists oft use other unrelated variables with those same
  282. values (say current year of release and a couple year more) *on
  283. purpose*, to block these very  attempts. But, as I said, we do
  284. not need to use winice to crack this cram... bear with me and
  285. see.
  286.      Let's be more technical: you have reached a level where you
  287. have the right to UNDERSTAND exactly how to access parameters
  288. (i.e. the fixed values that MUST be passed to a function) and
  289. local variables (i.e. the values that the protectionists have
  290. decided to use, say in order to compare or manipilate) inside
  291. windows calls:
  292. -    If you set a breakpoint at the exact function address, for
  293. example, :BPX GetFileTime, use ESP+(param#*4) to address
  294. parameters, where param# is 1, 2, 3, or whichever parameter that
  295. function calls... Since BOOL GetFileTime(HANDLE hFile, LPFILETIME
  296. lpCreation, LPFILETIME lpLastAccess, LPFILETIME lpLastModified)
  297. you'll easily know what is what.
  298. -    If you set a breakpoint INSIDE a function body (after the
  299. full prologue PUSH EBP, MOVE EBP,ESP, SUB ESP,size (locals) has
  300. been executed)use EBP+(param#*4)+4 to address parameters.
  301. -    Once the space for local variables is allocated on the
  302. stack, the local variables can be addressed using a negative
  303. offset from EBP. The first local variable is at EBP-4... with two
  304. pointer local variables (typically dword sized) one will
  305. therefore be at EBP-4 and the other will be at EBP-8.
  306. Comprendes?
  307. Enough... back to our calls to GetLocalTime... see how the
  308. "centralised" call approach of windows helps us a lot... all the
  309. calls of the program to this routine are here under our eyes...
  310. look at the 13 CALL references, once more, (THIS IS IMPORTANT)
  311. look at WHERE they come from:
  312. * Referenced by CALLs at Addresses:
  313. |:05024FBE, :05024FF0, :05035A05, :0506489C, :0511A2A4, 
  314. |:05167F6A, :05167FC1, :051F9E77, :05204C54, :05223F14, 
  315. |:05223F81, :05224013, :05271A72   
  316. |
  317. :05024E77 55              push ebp
  318. :05024E78 8BEC            mov ebp, esp
  319. :05024E7A 83EC10          sub esp, 00000010
  320. :05024E7D 8D45F0          lea eax, [ebp-10]
  321. :05024E80 50              push eax
  322. :05024E81 FF15905E3C05    Call dword ptr [053C5E90]          
  323. *GetLocalTime,(Kernel32-E2h)
  324.  
  325. A LITTLE ZEN: FEELING THE CALLS OF THE SEA
  326. Ok, let's see which sectors of our target do actually call our
  327. bait GetLocalTime... look at the call references above! Out of
  328. 13 calls, Sectors "024F" and "167F" and "223F" call it twice,
  329. whereby Sectors 035A, 0648, 11A2, 1F9E, 204C, 2240 and 271A call
  330. it only once.
  331. This may not mean anything, of course, but hey! on the other hand
  332. it could be very interesting... clearly we'll examine FIRST what
  333. happens in these "time-intensive-calling" parts of the code:
  334. Let's begin.
  335.  
  336. 1)   "Sector 024F" calls GetLocalTime twice, why?
  337.  
  338.   :first_call_snippet_(called_from_:0504A3F7)_calls_at_024FBE
  339. :05024FA4 55                 push ebp
  340. :05024FA5 8BEC               mov ebp, esp
  341. :05024FA7 83EC0C             sub esp, 0000000C
  342. :05024FAA 53                 push ebx
  343. :05024FAB 8D45F4             lea eax, [ebp-0C] 
  344. :05024FAE 8B1D04452C05   *** mov ebx, [052C4504] ;get holyloc
  345. :05024FB4 50                 push eax
  346. :05024FB5 885DFE             mov [ebp-02], bl ;create holylow
  347. :05024FB8 887DFF             mov [ebp-01], bh ;create holyhigh
  348. :05024FBB C1EB10             shr ebx, 10      ;create holyshr10
  349. :05024FBE E8B4FEFFFF     *** call 05024E77 GetLocalTime ;FIRST CALL
  350. :05024FC3 8A45FE             mov al , [ebp-02]
  351. :05024FC6 3845F6         *** cmp [ebp-0A], al  ;month=holylow?
  352. :05024FC9 7512               jne 05024FDD ;flag 1
  353. :05024FCB 8A45FF             mov al , [ebp-01]
  354. :05024FCE 3845F7         *** cmp [ebp-09], al  ;day=holyhigh?
  355. :05024FD1 750A               jne 05024FDD ;flag 1
  356. :05024FD3 66B80000           mov ax, 0000 ;flag 0
  357. :05024FD7 66395DF4       *** cmp [ebp-0C], bx  ;year=holyshr10?
  358. :05024FDB 7404               je 05024FE1  ;keep flag 0
  359.  
  360. :05024FDD 66B80100       *** mov ax, 0001  (flag 1: day or month
  361.                                             or year differ)
  362. :05024FE1 5B                 pop ebx
  363. :05024FE2 8BE5               mov esp, ebp
  364. :05024FE4 5D                 pop ebp
  365. :05024FE5 C3                 ret
  366.   :second_call_snippet_calls_at_5024FF0
  367. :05024FE6 55                 push ebp
  368. :05024FE7 8BEC               mov ebp, esp
  369. :05024FE9 83EC08             sub esp, 00000008
  370. :05024FEC 8D45F8             lea eax, [ebp-08]
  371. :05024FEF 50                 push eax
  372. :05024FF0 E882FEFFFF     *** call 05024E77 GetLocalTime ;SECONDCALL
  373. :05024FF5 0FB64DFB       *** movzx byte ptr ecx, [ebp-05] ;savepar
  374. :05024FF9 0FB645FA       *** movzx byte ptr eax, [ebp-06] ;savepar
  375. :05024FFD C1E108             shl ecx, 08
  376. :05025000 0BC8               or ecx, eax
  377. :05025002 0FB745F8       *** movzx word ptr eax, [ebp-08] ;savepar
  378. :05025006 C1E010             shl eax, 10
  379. :05025009 8BE5               mov esp, ebp
  380. :0502500B 0BC8               or ecx, eax
  381. :0502500D 5D                 pop ebp
  382. :0502500E 890D04452C05   *** mov [052C4504], ecx  ;save in holyloc
  383. :05025014 C3                 ret
  384.  
  385.      Quite interesting... a flagging (that could be a green
  386. light) and some parameters saved and compared within a holy
  387. location... why does this "sector 024F" call? Is it just checking
  388. against an holy location IF the time has changed enough to
  389. justify the snapping of other routines? Or is it this the part
  390. of the code that encrypts the date in the holy location
  391. itself?... We could follow this path, and "freeze" the holy
  392. location, or explore who calls this code snippets... this would
  393. bring us to the protection scheme as well of course... but this
  394. kind of work -MADE NOW- would not be methodologically correct... 
  395. YOU SHOULD INDEED NEVER GO ASTRAY... KEEP YOUR CRACKING APPROACH
  396. (as long as you do not get obvious signs that you found what you
  397. were looking for), it's like landing a plane... keep the original
  398. approach and DO NOT delve inside everything you happen to notice
  399. that "might" be a treffer! Here we have something "biting" the
  400. hook (our worm is GetLocalTime), but it's not yet time to pull
  401. out our fishing line yet.. let's continue... We were
  402. investigating all sections of our target's code which effectuate
  403. at least a double call to GetLocalTime... let's continue! Let's
  404. have a quick look to the other two "twin" occurrences of
  405. GetLocalTime (167F and 223F) before delving inside any one of
  406. them... maybe we will not need to delve at all. Remember, always
  407. concentrate on ONE approach at a time: multa agendo nihil agens!
  408.  
  409. Here the second "twin calls" location area:
  410. 2)   "Sector" 167F calls GetLocalTime, why?
  411.  
  412. :05167F6A E808CFEBFF          call 05024E77 ;CALL GetLocalTime 
  413. :05167F6F 66817DF4C007        cmp [ebp-0C], 07C0  ;is 1984?
  414. :05167F75 722F                jb 05167FA6       ;go badflag
  415. :05167F77 66817DF40108        cmp [ebp-0C], 0801  ;is 2049?
  416. :05167F7D 7727                ja 05167FA6         ;go badflag
  417. :05167F7F FF75F4              push [ebp-0C]    ;save validyear
  418. :05167F82 660FB645F7          movzx byte ptr ax, [ebp-09] ;pushday
  419. :05167F87 660FB64DF6          movzx byte ptr cx, [ebp-0A] ;pushmonth
  420. :05167F8C 50                  push eax
  421. :05167F8D 51                  push ecx
  422. :05167F8E E84EC10B00          call 052240E1       ;call here
  423. :05167F93 663B45E4            cmp ax, [ebp-1C]
  424. :05167F97 7D0D                jge 05167FA6        ;go badflag
  425. :05167F99 668B4DE4            mov cx, [ebp-1C]
  426. :05167F9D 662BC8              sub cx, ax
  427. :05167FA0 66894DF2            mov [ebp-0E], cx
  428. :05167FA4 EB06                jmp 05167FAC        ;do not badflag
  429.  
  430. * Referenced by a Jump at Addresses:05167E13(C), :05167ED7(C),
  431.  :05167F1B(C), :05167F64(C), :05167F75(C), :05167F7D(C),
  432.  :05167F97(C); lotta routines badflag
  433.                here... this is BADFLAG INTENSIVE
  434. :05167FA6 66C745FE0100     mov [ebp-02], 0001 ;BAD FLAG !!!***
  435.    :no_bad_flag
  436. :05167FAC FF75DC           push [ebp-24]
  437. :05167FAF FF151C5C3C05     Call dword ptr[053C5C1C];RegCloseKey
  438. :05167FB5 EB25             jmp 05167FDC ;jump 2nd getlocaltime
  439.   :only_5167DE5_calls_this_second_GetLocalTime
  440. :05167FB7 66C745EC0000     mov [ebp-14], 0000
  441. :05167FBD 8D45F4           lea eax, [ebp-0C]
  442. :05167FC0 50               push eax ;SECOND GetLocalTime
  443. :05167FC1 E8B1CEEBFF       call 05024E77 GetLocalTime  ;call it
  444. :05167FC6 66817DF4C007     cmp [ebp-0C], 07C0 ;between 1984...
  445. :05167FCC 7208             jb 05167FD6     ;jump flag_unvalid_year
  446. :05167FCE 66817DF40108     cmp [ebp-0C], 0801 ;...and 2049? 
  447. :05167FD4 7606             jbe 05167FDC    ;jump_to_valid_year
  448.    :flag_unvalid_year
  449. :05167FD6 66C745FE0100     mov [ebp-02], 0001 ;flag "unvalid_year"
  450.    :valid_year_almost_everybody_calls_here
  451. :05167FDC 66837DFE00       cmp [ebp-02], 0000   ;valid_flag?
  452. :05167FE1 755F             jne 05168042  ;beggar off:unvalid something
  453. :05167FE3 66837DF000       cmp [ebp-10], 0000   ;valid ebp-10?
  454. :05167FE8 750E             jne 05167FF8         ;jmp unvalid_e10
  455. :05167FEA 66837DEC00       cmp [ebp-14], 0000   ;valid ebp-14?
  456. :05167FEF 7451             je 05168042          ;beggar off,unvalid 
  457. :05167FF1 66837DF000       cmp [ebp-10], 0000   ;sure thatebp-10=0?
  458. :05167FF6 7407             je 05167FFF          ;continue ifso
  459.   :unvalid_e10
  460. :05167FF8 66837DEC00       cmp [ebp-14], 0000   ;check if e14valid
  461. :05167FFD 7543             jne 05168042         ;no? be damned!
  462.   :valid_e10_and_e14
  463. :05167FFF 0FBF4DF2         movsx word ptr ecx, [ebp-0E] ;e10 and e14 true
  464. :05168003 66833D58192C0501 cmp dword ptr [052C1958], 0001 
  465. :0516800B 1BC0             sbb eax, eax
  466. :0516800D 83E05A           and eax, 0000005A  ;pretty obvious
  467. :05168010 83C05A           add eax, 0000005A  ;isnt it?
  468. :05168013 3BC1             cmp eax, ecx       ;HERE********
  469. :05168015 7C2B             jl 05168042        ;beggar off
  470. :05168017 66837DF21E       cmp [ebp-0E], 001E ;0x1E = 30
  471. :0516801C 7F4A             jg 05168068        ;good guy jump
  472. :0516801E 8D45F4           lea eax, [ebp-0C]
  473.  
  474.      Well, that's was it actually... we notice two consecutive
  475. locations with 5Ah (90 decimal) there... as if they had written
  476. "OUR TIME LIMIT IS HERE, PLEASE REMOVE AND USE FOR EVER AND
  477. EVER". Maybe Micro$oft wants exactly this... I mean, they give
  478. away their (bugged) web browser for free just in order to
  479. bankrupt Netscape, why shouldnt they as well give every software
  480. away for free (bad protecting it on time limits and spreading
  481. everything on all cd-rom covers of the planet) until they have
  482. bankrupted every concurrent and do effectively held every user
  483. on the planet "pillado por los huevos"? 
  484.      Maybe in cracking this protection scheme I'm only helping
  485. Gates... the more people use its programs the more they will
  486. spread... the more he will dominate the market... yet I could not
  487. care less about Micro$oft's own stupid plans...  programming the
  488. way they do, they will never be able to dominate a portion of
  489. halfbacked potatoes in my humble opinion... therefore let's crack
  490. this crap black and blue and let's hope Micro$oft loose a lot of
  491. money thank us, yeah, that's life! Let's crack a lot of Micro$oft
  492. software from now on! A white flower in our mouth, a computer not
  493. far away, a cold determination in our fingers. Death to Gates!
  494.  
  495. *** Quick Crack for Micro$oft's Project 95, by +ORC, 04/1997***
  496. search for the string
  497. :05167FA6 66C745FE0100       mov [ebp-02], 0001 ;BAD FLAG****
  498. and change it to:
  499. :05167FA6 66C745FE0000       mov [ebp-02], 0000 ;always good
  500. *** now find some stupid yuppies and give them this app ***
  501.  
  502. JUST A MOMENT (1)
  503. Well, just a moment... go back to the code "snippets" above,
  504. pupils... why did we not search for
  505. :05168015 7C2B         jl 05168042        ;beggar off
  506. in order to noop everything say with an inc/dec:
  507. :05168015 40        inc eax   
  508. :05168016 48        dec eax 
  509. Why? 
  510. Because it would NOT have worked... or, as a matter of fact, it
  511. would have worked only in SOME cases... this is an example of a
  512. "protectionists' bait", please examine the code. 
  513.      You should -by now- know enough our art to be able to
  514. understand by yourself why the crack at 5167FA6 works and the
  515. crack at 5168015 (which is indeed part of the protection) will
  516. not work... a hint for you: change months and YEARS of your os
  517. as you experiment with this stuff. This answer is part of the
  518. strainer of this lesson, therefore work on it and understand the
  519. problem.
  520.      And what about the remaining last "double call" location at
  521. "223"? Did I not say we should keep steady on our approach before
  522. delving inside?
  523.      Yes and no: "quod satis est cui contingit, nihil amplius
  524. optet" (Horatius, emailing his friends, as you can see you can
  525. always find a proverb to demonstrate what you are saying, even
  526. if you are contradicting yourself :=)
  527.      But as soon as you SEE the protection there is NO POINT
  528. (unless you really have to, in order to understand some weird
  529. scheme thoroughly) to continue... the plane is landed, relax,
  530. drink something.
  531.      Anyway for such things there are no fixed rules... do
  532. whatever you like and prefer, I personally think that the best
  533. approach is a mixture of iron will and extreme flexibility.
  534.  
  535. JUST A MOMENT (2)
  536. But wait, since they used the 5Ah byte... could not we have found
  537. the protection just searching for 5Ah? 
  538.      Yes, and indeed, we would have found the scheme around it
  539. immediately... but that IS NOT the correct approach, since you
  540. should NOT always presume that the protectionists behave REALLY
  541. always that stupid (even if they almost always do :=)
  542.  
  543. JUST A MOMENT (3)
  544. But wait, could we have not just winiced the working of the
  545. program in order to backtrace as soon as the protection nag
  546. screen snaps?
  547.      Yes, and it would have worked... but why ruin your eyes on
  548. screen in a closed and may be dusty room, getting cramps in your
  549. shoulders that not even a good massage will blow away, when you
  550. can crack much more relaxed, sitting quiet in a shadowy garden,
  551. looking lazily (it's April! A beautiful month! Go outside! What
  552. the hell are you doing inside a room?) at a couple of sheets of
  553. paper, feeling the wind among the leaves above you, while a cool
  554. Martini-Wodka fizzles in your hands? If you want to use the
  555. "live" winice approach go ahead... I'll even tell you right now
  556. a couple of things that can be useful in order to crack some
  557. (other) protections: for Cinderellas schemes bpx MessageBox or
  558. bpx GetLocalTime or bpx GetFileTime and look WHO gets the "time"
  559. data a little before the nagscreen snaps... I did not check but
  560. I'm sure that if you do it here, you'll have quite a lot of calls
  561. along the program, whereby the "initializing" calls from our
  562. "sector 24F" will snap at the beginning (and at the end) of the
  563. target life and our protection call (the one we cracked the bad
  564. flag of) i.e.: 
  565.  
  566. :05167F6A E808CFEBFF   call 05024E77 ;CALL GetLocalTime in KERNEL 
  567.  
  568. will happen JUST BEFORE the snap... so you can crack thatta way
  569. too... these patterns are always the same.
  570.  
  571. **************** A little icy digression *****************
  572. This is -after all- a tutorial, therefore for those of you that
  573. do not know anything, here are some useful (and well known) older
  574. winice little tricks and memory addresses discussions. Even if
  575. I do prefer to use as much as possible my "dead listing" methods,
  576. I realise that at times the help of winice is indispensable...
  577. the little tricks below refer to Winice for windows 95 older copy
  578. (before Godot, i.e. 3.0) and you may skip this section if you are
  579. using winice 3.0. which has the IF feature for conditional
  580. breakpoints, the WHAT command and much more. I strongly
  581. reccommand using Winice 3.0. In order to learn how to use it
  582. correctly your best approach is to find on the web the GOOD
  583. documentation of Numega (it's in adobe acrobat's PDFformat) here
  584. you have the names you'll need to find it (and NAMES are the MOST
  585. important thing on the web):
  586.      Si30cr.pdf     3.205.000 bytes    COMMAND REFERENCE
  587.      Si30ug.pdf     1.038.000 bytes     USING SOFTICE
  588. Last time I fetched them they were inside the zipped file
  589.      Sice3doc.zip, 3.358.000 bytes
  590. read these documents thoroughly.  Once you read them you (almost)
  591. will not need my lessons any more. 
  592. But some of the simple tricks below can be useful even with
  593. Winice 3.0., and anyway I want ALL of the readers of this
  594. tutorial to know their tools and to use them in the best way,
  595. even those too lazy or too stupid to fetch the above mentioned
  596. files... therefore, here you are... some (older) winice's MUST
  597. know:
  598.  
  599. BPM DS:xxxxxxxx  W GT 1E
  600. Breakpoint first time that the byte at location DS:xxxxxxxx has
  601. a value written to it that's greater than 1Eh (30)
  602. Useful qualifiers are EQ (equal) NE (not equal) GT (greater than)
  603. LT (less than) and M (mask) this last one is pretty complicated
  604. but allows powerful breakpointing for dongles cracking: after
  605. having given your routine command "tss", begin your dongle
  606. breakpointing using, for instance: 
  607. BPIO 3F6 R EQ M 11XX xx00
  608. This defines a byte break point on I/O port read, the first time
  609. that I/O port 3F6 is read with ANY value that has the two high
  610. order bits set to 1 and the two lower ones to zero, the other
  611. bits can be any value. The same is valid for BPM (breakpoint on
  612. memory write):
  613. BPM CS:802A2D22 W EQ M 0xxx xxxx xxxx xxxx xx11
  614. you dig it? The mask method is even better than the qualifier one
  615. if you are NOT sure about which value the protection will load :=)
  616.  
  617. CSIP NOT &F000:0 &FFFF:0
  618. Breakpoint only outside BIOS useful to limit breakpoint snapping
  619. Remember that CSIP and BPM (READ/WRITE) can be very USEFUL to
  620. slow down the execution of a windows program... if you use "heavy
  621. breakpointing" in this way, setting a number of "useless" but
  622. heavy breakpoints that winice will monitor, windows will crawl
  623. (even on a Pentium 200) and you'll be able to breakpoint MANUALLY
  624. exactly at the point where a protection snaps... I still prefer
  625. the "dead listing" method of cracking personally, though.
  626.  
  627. BPINT 21 AH=0F
  628. Breakpoint on openfile (funny how many INT 21 are execited under
  629. windoze)
  630. (old style, with Winice 3 it's BPINT 21 IF EAX=0F)
  631. BPINT 21 AH=2A
  632. Breakpoint on GetDate 
  633. (old style, with Winice 3 it's BPINT 21 IF EAX==2A)
  634.  
  635. When we are still at it, remember that in 32bit mode there are
  636. only TWO selectors (when you search the whole memory for
  637. instance):
  638. 28:0 and 4 virtual gigabytes of CODE
  639. 30:0 and 4 virtual gigabytes of DATA and STACK
  640.  
  641. We saw (cracking DOS) how to get from virtual address to physical
  642. address in 8086 style segment:offset code: multiply the segment
  643. by 16 and then add the offset. In a "protected mode" selector
  644. it's different: linear address is calculated by adding the offset
  645. TO THE BASE ADDRESS FOUND IN THE GDT (or LDT, local descriptor
  646. table is used if bit TWO of the selector is a 1, global DT is
  647. used otherwise... GDT and LDT are "lookup" tables used to
  648. calculate addresses).
  649. At times you must understand a little the physical addresses
  650. structure in order to crack effectively:
  651. 00000000 - 000FFFFF Current Virtual Machine (Windows and Windows
  652. Programs)
  653. 00400000 - 7FFFFFFF Physical memory (contiguous)
  654. 80000000 - 803FFFFF      Windows' VxDs
  655. 80500000 - 80FFFFFF Windows programs
  656. 81000000 - FFFFFFFF DOS VMs
  657. ...use the commands "page" and "addr" and have a look around. The
  658. command addr is also very useful to understand in which context
  659. you are when winice pops up.
  660. Remember that each 32 bit task is given the address space from
  661. 400000 to 7FFFFFFF, which is called an "address context". This
  662. virtual address space is reserved for 32 bits applications and
  663. private DLLs
  664.  
  665. And now two MUST KNOW winice commands that will spare you a lot
  666. of wasted time when you delve inside the huge windows codebulks
  667. we have to peruse:
  668.  
  669. P RET (that's F12 most of the time)
  670. steps out of the current procedure, may take ages if it's very
  671. large
  672. that's step until return
  673.  
  674. G @SS:ESP (that's F11 most of the time)
  675. throws you at the caller of the procedure you bpxed on
  676. (bpx GetLocalTime and execute F11 (or write G @SS:ESP) as soon
  677. as winice pops up and you'll see what I mean)
  678.  
  679. A couple of watches like *ds:esi (and ds:esi) and a dex 1 ss:esp
  680. in your ini setting of winice would be a good idea too IMO.
  681.  
  682. This said, Winice 3.0 allows POWERFUL breakpointin, like for instance:
  683. bpx ntoskrnl!ExAllocatePoolWithTag IF (esp->c == 1) DO "data1;dd eax" 
  684. (I will explain all this ∙ore thoroughly in the lessons about Windows NT)
  685. **********************************************
  686. Back to our time protections cracking (and Micro$oft bashing :=).
  687.  
  688.      Once more... there are THOUSAND different ways to crack
  689. these applications, and this GetLocalTime "fishing" is only ONE
  690. of them... I will teach you -of course- ALL the methods I believe
  691. are MOST effective... you must be enough crack-able by now to
  692. know when, applying these techniques to OTHER programs (hopefully
  693. Micro$oft ones) you'll have to use slightly or substantially
  694. different approaches... non semper Saturnalia erunt, as you'll
  695. see.
  696.  
  697. Are these protections always so easy to defeat?
  698. No and yes, maybe no... yet there are far more complex schemes.
  699. But time checking from a CD-ROM code is the ultimate doom of the
  700. protectionists... you see: the problem for them is the following:
  701. They are protecting using a "write only once" media (a CD-ROM)...
  702. therefore every time you put the cd-rom in your driver you are
  703. re-installing a perfect "virgin" copy of the protected program...
  704. there is no way a recursive message can be placed INSIDE the
  705. code, telling it to never execute again... I remeber older nasty
  706. "quiver" protections in dos... after the 20ntieth installation
  707. the program formatted as bad a sound sector of the diskette...
  708. that was clever! But that's impossible on a read only media,
  709. therefore let's see... where can they keep track of the
  710. eventuality that you used it before?
  711. 1)   Inside the intricacies of Windows register, this most
  712. obscure fat abomination (should I write a scary computer fiction
  713. film, I would imagine a windows register growing fatter and
  714. fatter, week after week, and then suddenly grabbing the user
  715. through the a:\ drive in order to eat him :=)
  716. 2)   Inside an apparently unrelated file or *.dll that gets
  717. "lost" inside the garbage subdirectories c:\windows or
  718. c:\windows\system (by the way, that's exactly the same technique
  719. you should use in order to protect your files at work from
  720. administrator's prying eyes... throw every application inside
  721. windows subdirs and give them funny names, like a6JJJK.EXE... no
  722. administrator on this earth (and no censorship corporate
  723. patrolling software) will come to the idea that that is your
  724. beloved chess program :=).
  725. 3)   Inside small parts of the BOOT sector of your harddisk that
  726. can safely be used for this kind of tricks without altering the
  727. booting (this is a trick the protectionists have learnt from our
  728. fellows viri-writers... see how even the bad ones have a teaching
  729. function in this funny virtual world. Once more virus code
  730. studying is VERY important in order to crack well. 
  731. Alas for the protectionists! All these tricks are pretty easy to
  732. defeat too, and I will show you HOW to do it :=)
  733.  
  734. For a start here is HOW easily you would have checked your boot
  735. sector with an old DOS system...
  736. 1)   Run debug (or, better, symdeb)
  737. 2)   -L 100 2 0 1 
  738. (that's Load into memory address Ox100 from drive C (that's
  739. number 2... 0 is A, 1 is B and 2 is C, duh, starting from sector
  740. 0 for 1 sector whatever you find there. Here you have the boot
  741. sector of the PC I'm writing on:
  742. -L 100 2 0 1
  743. -d 100 L 200
  744. 17D3:0100  EB 3C 90 4D 53 57 49 4E-34 2E 31 00 02 40 01 00 k<.MSWIN4.1..@..
  745. 17D3:0110  02 00 02 00 00 F8 9A 00-3F 00 40 00 3F 00 00 00 .....x..?.@.?...
  746. 17D3:0120  41 44 26 00 80 00 29 FC-0F 5F 3C 20 20 20 20 20 AD&...)|._<     
  747. 17D3:0130  20 20 20 20 20 20 46 41-54 31 36 20 20 20 FA 33 FAT16   z3
  748. 17D3:0140  C9 8E D1 BC FC 7B 16 07-BD 78 00 C5 76 00 1E 56 I.Q<|{..=x.Ev..V
  749. 17D3:0150  16 55 BF 22 05 89 7E 00-89 4E 02 B1 0B FC F3 A4 .U?"..~..N.1.|s$
  750. 17D3:0160  06 1F BD 00 7C C6 45 FE-0F 8B 46 18 88 45 F9 38 ..=.|FE~..F..Ey8
  751. 17D3:0170  4E 24 7D 22 8B C1 99 E8-77 01 72 1A 83 EB 3A 66 N$}".A.hw.r..k:f
  752. 17D3:0180  A1 1C 7C 66 3B 07 8A 57-FC 75 06 80 CA 02 88 56 !.|f;..W|u..J..V
  753. 17D3:0190  02 80 C3 10 73 ED 33 C9-8A 46 10 98 F7 66 16 03 ..C.sm3I.F..wf..
  754. 17D3:01A0  46 1C 13 56 1E 03 46 0E-13 D1 8B 76 11 60 89 46 F..V..F..Q.v.`.F
  755. 17D3:01B0  FC 89 56 FE B8 20 00 F7-E6 8B 5E 0B 03 C3 48 F7 |.V~8.wf.^..CHw
  756. 17D3:01C0  F3 01 46 FC 11 4E FE 61-BF 00 07 E8 23 01 72 39 s.F|.N~a?..h#.r9
  757. 17D3:01D0  38 2D 74 17 60 B1 0B BE-D8 7D F3 A6 61 74 39 4E 8-t.`1.>X}s&at9N
  758. 17D3:01E0  74 09 83 C7 20 3B FB 72-E7 EB DD BE 7F 7D AC 98 t..G;{rgk]>.},.
  759. 17D3:01F0  03 F0 AC 84 C0 74 17 3C-FF 74 09 B4 0E BB 07 00 .p,.@t.<.t.4.;..
  760. 17D3:0200  CD 10 EB EE BE 82 7D EB-E5 BE 80 7D EB E0 98 CD M.kn>.}ke>.}k`.M
  761. 17D3:0210  16 5E 1F 66 8F 04 CD 19-BE 81 7D 8B 7D 1A 8D 45 .^.f..M.>.}.}..E
  762. 17D3:0220  FE 8A 4E 0D F7 E1 03 46-FC 13 56 FE B1 04 E8 C1 ~.N.wa.F|.V~1.hA
  763. 17D3:0230  00 72 D6 EA 00 02 70 00-B4 42 EB 2D 60 66 6A 00 .rVj..p.4Bk-`fj.
  764. 17D3:0240  52 50 06 53 6A 01 6A 10-8B F4 74 EC 91 92 33 D2 RP.Sj.j..ttl..3R
  765. 17D3:0250  F7 76 18 91 F7 76 18 42-87 CA F7 76 1A 8A F2 8A wv..wv.B.Jwv..r.
  766. 17D3:0260  E8 C0 CC 02 0A CC B8 01-02 8A 56 24 CD 13 8D 64 h@L..L8...V$M..d
  767. 17D3:0270  10 61 72 0A 40 75 01 42-03 5E 0B 49 75 77 C3 03 .ar.@u.B.^.IuwC.
  768.  
  769. [MICROSOFT PUBLISHER 1997]
  770. Time to bash Microsoft once more... how nice! Let's have a
  771. (quick) look at Microsoft Publisher 1997, another "60 days" trial
  772. version protection from Microsoft (60 days, because the DTP
  773. market moves so quickly that they cannot allow to let it loose
  774. for three months)... I'll show you where the protection is, how
  775. it snaps and how to crack it... I got my copy from one of the
  776. MANY magazines that published the 60 days demo version in April
  777. 1997... you should be able to find this one everywhere... here
  778. are the relevant data:
  779.  
  780. MSPUB.EXE  2.476.304  19/04/97  19:19  <--- da target
  781. MSPUB.ALF 34.054.330  17/04/97  20:18  <--- da dead listing
  782. MSPUB.DED  2.476.304  19/04/97  19:19  <--- da copy you need
  783.  
  784. You should always do a copy of the original target BEFORE
  785. beginning your work on it, you'l need it a lot when you time
  786. deprotect.
  787.  
  788. To crack this target we'll use a slightly different approach...
  789. let's call this technique "hit and see"... it's one of the most
  790. obvious approaches, and I surely have not invented it...
  791. everybody knows it: you run the program, you let the time
  792. protection snap, you look at the "hardwired" hex differences
  793. inside the body of the target (the "non functioning" copy will
  794. slightly differ from the "functioning" one) and you "reverse
  795. engineer" your dead listing back to the protection scheme that
  796. snapped the differences... pretty easy, isnt'it?
  797.  
  798. -------- digression: words inside targets ---------------------
  799. If you are interested in another, COMPLETELY DIFFERENT cracking
  800. door, here are the relevant messages <expir> inside our target...
  801. I used  SR32exe to fetch them (a very nice fetcher, thanks
  802. fravia! :=), which  is much better than my own old C scripts :=(
  803. As a small "extra" for this lesson, crack the protection out of
  804. this fetcher, a program that I'm sure you'll find VERY useful (I
  805. did):
  806. -------------------------------------
  807. Funduc Software search application:
  808. http://home.sprynet.com:80/sprynet.funduc
  809. 102372.2530@compuserve.com
  810. SR32     EXE       286.720  13/05/96   0:14 SR32.exe
  811. SR       HLP        36.830  12/05/96   3:28 SR.HLP
  812. SR       EXE       170.624  12/05/96  23:58 Sr.exe
  813. ------------------------------------
  814. Here the results of this program running on "expir"...
  815. ------------------------------------
  816. Processing file :  C:\PROGRAM FILES\MICROSOFT PUBLISHER 97\Mspub.exe
  817. Offset 0x1ac5e9     
  818. - This trial version of Publisher has <expir>ed. To order a permanent
  819. copy, call 1-800-426-9400 or visit the Publisher site on the World 
  820. Wide Web at http://www.microsoft.com/publisher/. To uninstall this
  821. version choose Add/Remove Programs i
  822. Offset 0x1ac6f4     
  823. - This trial version of Publisher will <expir>e in %d days. For more
  824. information about Publisher 97, call 1-800-426-9400 or visit the
  825. Publisher site on the World Wide Web at http://www.microsoft.com/publisher/. 
  826. ----------------- digression end --------------
  827.  
  828. As I said... there are MANY doors you may trespass to crack this
  829. target... let's continue with the simplest one in my opinion: 
  830.  
  831. 1)   Let's run it... it runs, how nice!
  832. 2)   Let's move the OS date... say four months ahead. 
  833.      It does not run anymore, this is sad! 
  834. 3)   WHAT HAS CHANGED IN THE FILE? That's the point my reader...
  835. Let's compare the two files... the original and the copy after
  836. the fatidic message "trial time is out, won't work any more", bye
  837. sucker:*
  838.  
  839. FC /b mspub.ded mspub.exe 
  840.  
  841. (that's the DOS command FileCompare that you are giving, duh)
  842.  
  843. And this is the result you'll get:
  844.           "Comparing files mspub.ded and mspub.exe"
  845.           "000F3703: 75 EB"
  846.           "000F370C: 75 EB"
  847.  
  848. MMMM! That's interesting! And what do we have there? Let's have
  849. a look at our (huge) dead listing (do not forget: 2560 (256*10)
  850. bytes difference between REAL AND Wdasm addressing... you just
  851. add A00h to the DOS addresses to get your bearings inside the
  852. dead listing files... F3703+A00= F4103... F370C+A00=F410C):
  853.  
  854.  
  855. * Referenced by lotta CALLs at Addresses:
  856. |:004014F1, :0040199A, :00401AC6, :00401C37, :00401F6C,  ;first calls 
  857. ... HUNDERT CALLS AND HUNDERT MORE... many many calls I have not reprinted
  858. |:0058B1C4, :0058B279, :0058B443, :0058BA9F              ;last calls
  859. |
  860. :004F40FC 8B4C2404         mov ecx, [esp + 04]
  861. :004F4100 83F901           cmp ecx, 1
  862. :004F4103 EB09       ****  jmp 004F410E ;..... Should be 75, i.e. Jne
  863. :004F4105 833DD0225C0000   cmp dword ptr [005C22D0], 0
  864. :004F410C EB06       ****  jmp 004F4114 ;..... Should be 75, I.e. Jne
  865.  
  866. :004F410E 890DD0225C00     mov [005C22D0], ecx  ;ecx <> 1 flag 22D0 FALSE
  867.  
  868. :004F4114 A1D4225C00       mov eax, [005C22D4]
  869. :004F4119 51               push ecx
  870. :004F411A 83E840           sub eax, 00000040
  871. :004F411D 890DC4935C00     mov [005C93C4], ecx
  872. :004F4123 A3D4225C00       mov [005C22D4], eax
  873. :004F4128 83C040           add eax, 00000040
  874. :004F412B 50               push eax
  875. :004F412C FF158C085D00     Call dword ptr [005D088C] ;call MSVCRT40.longjmp
  876. :004F4132 83C408           add esp, 00000008
  877. :004F4135 C20400           ret 0004
  878.  
  879. All this means for us only one thing... location [005C22D0]
  880. decides a lot. But wait, let's see... What did  these assholes
  881. do? They "patched" their own program in order to protect it...
  882. how funny... time is out, so jmp anyway (instead of jump on not
  883. equal) to the evil routines... they know that now we would like
  884. to know WHO calls here... and there are (therefore, as
  885. dissuasion) hundert of procedures calling this cram... no point
  886. in checking all of them... you would sink in a sea of calls...
  887. what will we do? Where is the real and only one PROTECTION call
  888. to 4F40FC among this bunch of useless calls? We have only ONE way
  889. to find it out without losing time... Let's zen a little... you
  890. have read this lesson from the beginning... now STOP and think...
  891. i.e. use your brain (supposed you have one): do not read any more
  892. what follow: STOP NOW and answer this question BEFORE
  893. proceeding... really... you are here to learn, NOT TO COPY
  894. METHODS THAT OTHERS HAVE FOUND... once more... We know that
  895. somebody modified this cram... but HOW DO WE GET BACK (how do we
  896. reverse the flow) TO THE CORRECT CALLING ROUTINE AMONG HUNDERT
  897. OF THEM calling here?
  898. Ok, you did stop and think... you may go on reading (if you did
  899. not... be ashamed... cracking is like watching a beautyful
  900. picture... you must think a lot, else your watching is useless).
  901. OK: We used the GetLocalTime routine as a bait inside my first
  902. example... can we apply it here? Let's search for it... HEY! They
  903. do not use it at all, there is NO GetLocalTime in this
  904. application... how the hell do they know which time is it?
  905. Let's search for "time", my friends... here the locations:
  906.  
  907. Processing file :  C:\PROGRAM FILES\MICROSOFT PUBLISHER 97\Mspub.alf
  908. Line 1340 -  Addr:BFF77105 hint(00DB) Name: GetFile<Time>
  909. Line 1342 -  Addr:BFF77144 hint(01F9) Name: SetFile<Time>
  910. Line 1457 -  Addr:BFF62E82 hint(01FE) Name: Set<Time>r
  911. Line 1494 -  Addr:BFF61AC2 hint(0162) Name: Kill<Time>r
  912. Line 1547 -  Addr:BFF643F9 hint(00EF) Name: GetDoubleClick<Time>
  913. Line 1555 -  Addr:BFF63E4D hint(01C9) Name: SendMessage<Time>outA
  914. Line 1572 -  Addr:BFF64406 hint(00D1) Name: GetCaretBlink<Time>
  915. Line 1591 -  Addr:BFF647E6 hint(0110) Name: GetMessage<Time>
  916. Line 1865 -  Addr:10238C10 hint(0466) Name: <time>
  917. Line 1871 -  Addr:102387D0 hint(0423) Name: local<time>
  918.  
  919.      Ok, that's more than enough, thankyou... let's begin from
  920. the beginning... what about a little GetFileTime pinpointing to
  921. start with? Where are the GetFileTime routines inside our target?
  922.  
  923. :004CBC11 FF1594005D00   Call dword ptr [005D0094]
  924. ;KERNEL32.GetFileTime
  925. :004CBD3A FF1594005D00   Call dword ptr [005D0094]
  926. ;KERNEL32.GetFileTime
  927.  
  928. Only TWO? Most rewarding... and where is the triggering call to
  929. the first one (probably to both of them)?
  930. Have a look at the dead listing of our target... these cracks are
  931. so simple that I wonder at times why the hell they insist...
  932. either they shoudl learn HOW TO PROTECT PROPERLY the shit they
  933. program, or they should give it for free to everybody (like I'm
  934. doing now... hope that EVERY student and every poor chap in
  935. Africa and Asia will use Micro$oft publisher for free without
  936. ever giving them a cent... this is european cracking at his best!
  937. And besides, that's the minimum we owe the poor slaves that do
  938. sweat and work hard in order to pay for our barbecues :=)...
  939. this is the synthesis of the dead listing:
  940.  
  941. * Referenced by a CALL at Address:004C8843    ;This is the call
  942. that triggers everything... DO NOT FORGET IT
  943. :004CBA50 55                      push ebp
  944. :004CBA51 A1D4225C00              mov eax, [005C22D4]
  945. :004CBA56 8BEC                    mov ebp, esp
  946. :004CBA58 83C040                  add eax, 00000040
  947. :004CBA5B 81EC5C010000            sub esp, 0000015C
  948. :004CBA61 A3D4225C00              mov [005C22D4], eax
  949. :004CBA66 C745E414165C00          mov [ebp-1C], 005C1614;->"MSPUBW40.DLL"
  950. :004CBA6D C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  951. :004CBA74 56                      push esi
  952. :004CBA75 57                      push edi
  953. :004CBA76 6A00                    push 00000000
  954. :004CBA78 50                      push eax
  955. :004CBA79 E889020C00              Call 0058BD07;MSVCRT40._setjmp3, 
  956. :004CBA7E 83C408                  add esp, 00000008
  957. :004CBA81 85C0                    test eax, eax
  958. :004CBA83 B801000000              mov eax, 00000001
  959. :004CBA88 7502                    jne 004CBA8C
  960. :004CBA8A 33C0                    xor eax, eax
  961. :004CBA8C 85C0                    test eax, eax
  962. :004CBA8E 0F8527030000            jne 004CBDBB
  963. :004CBA94 6A00                    push 00000000
  964. :004CBA96 FF1590085D00   **** Call dword ptr [005D0890];MSVCRT40.time **
  965. :004CBA9C 83C404                  add esp, 00000004
  966. :004CBA9F B980510100              mov ecx, 00015180
  967. :004CBAA4 2BD2                    sub edx, edx
  968. :004CBAA6 8945F4                  mov [ebp-0C], eax
  969. :004CBAA9 6804010000              push 00000104
  970. :004CBAAE 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  971. :004CBAB4 F7F1                    div ecx
  972. :004CBAB6 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  973. :004CBABC 2955F4                  sub [ebp-0C], edx
  974. :004CBABF 50                      push eax
  975. :004CBAC0 FF158C005D00   Call dword ptr[005D008C];GetSystemDirectoryA
  976. :004CBAC6 B9FFFFFFFF              mov ecx, FFFFFFFF
  977. :004CBACB 2BC0                    sub eax, eax
  978. :004CBACD F2                      repnz
  979. :004CBACE AE                      scasb
  980. :004CBACF F7D1                    not ecx
  981. :004CBAD1 80BC29A2FEFFFF5C        cmp byte ptr [ecx + ebp -
  982. 0000015E], 5C
  983. :004CBAD9 7434                    je 004CBB0F
  984. :004CBADB BF10165C00              mov edi, 005C1610
  985. :004CBAE0 B9FFFFFFFF              mov ecx, FFFFFFFF
  986. :004CBAE5 2BC0                    sub eax, eax
  987. :004CBAE7 F2                      repnz
  988. :004CBAE8 AE                      scasb
  989. :004CBAE9 F7D1                    not ecx
  990. :004CBAEB 2BF9                    sub edi, ecx
  991. :004CBAED 8BD1                    mov edx, ecx
  992. :004CBAEF 8BF7                    mov esi, edi
  993. :004CBAF1 B9FFFFFFFF              mov ecx, FFFFFFFF
  994. :004CBAF6 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  995. :004CBAFC 2BC0                    sub eax, eax
  996. :004CBAFE F2                      repnz
  997. :004CBAFF AE                      scasb
  998. :004CBB00 4F                      dec edi
  999. :004CBB01 8BCA                    mov ecx, edx
  1000. :004CBB03 C1E902                  shr ecx, 02
  1001. :004CBB06 F3                      repz
  1002. :004CBB07 A5                      movsd
  1003. :004CBB08 8BCA                    mov ecx, edx
  1004. :004CBB0A 83E103                  and ecx, 00000003
  1005. :004CBB0D F3                      repz
  1006. :004CBB0E A4                      movsb
  1007. :004CBB0F 8B7DE4                  mov edi, [ebp-1C]
  1008. :004CBB12 B9FFFFFFFF              mov ecx, FFFFFFFF
  1009. :004CBB17 2BC0                    sub eax, eax
  1010. :004CBB19 F2                      repnz
  1011. :004CBB1A AE                      scasb
  1012. :004CBB1B F7D1                    not ecx
  1013. :004CBB1D 2BF9                    sub edi, ecx
  1014. :004CBB1F 8BD1                    mov edx, ecx
  1015. :004CBB21 8BF7                    mov esi, edi
  1016. :004CBB23 B9FFFFFFFF              mov ecx, FFFFFFFF
  1017. :004CBB28 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  1018. :004CBB2E 2BC0                    sub eax, eax
  1019. :004CBB30 F2                      repnz
  1020. :004CBB31 AE                      scasb
  1021. :004CBB32 4F                      dec edi
  1022. :004CBB33 8BCA                    mov ecx, edx
  1023. :004CBB35 C1E902                  shr ecx, 02
  1024. :004CBB38 F3                      repz
  1025. :004CBB39 A5                      movsd
  1026. :004CBB3A 8BCA                    mov ecx, edx
  1027. :004CBB3C 6A00                    push 00000000
  1028. :004CBB3E 83E103                  and ecx, 00000003
  1029. :004CBB41 6880000000              push 00000080
  1030. :004CBB46 F3                      repz
  1031. :004CBB47 A4                      movsb
  1032. :004CBB48 6A03                    push 00000003
  1033. :004CBB4A 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1034. :004CBB50 6A00                    push 00000000
  1035. :004CBB52 6A01                    push 00000001
  1036. :004CBB54 6800000080              push 80000000
  1037. :004CBB59 50                      push eax
  1038. :004CBB5A FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1039. :004CBB60 8945FC                  mov [ebp-04], eax
  1040. :004CBB63 83F8FF                  cmp eax, FFFFFFFF
  1041. :004CBB66 7507                    jne 004CBB6F
  1042. :004CBB68 6AFE                    push FFFFFFFE
  1043. :004CBB6A E88D850200              call 004F40FC
  1044. :004CBB6F 6A00                    push 00000000
  1045. :004CBB71 8B45FC                  mov eax, [ebp-04]
  1046. :004CBB74 6A00                    push 00000000
  1047. :004CBB76 6850D90100              push 0001D950
  1048. :004CBB7B 50                      push eax
  1049. :004CBB7C FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1050. :004CBB82 83F8FF                  cmp eax, FFFFFFFF
  1051. :004CBB85 7507                    jne 004CBB8E
  1052. :004CBB87 6AE7                    push FFFFFFE7
  1053. :004CBB89 E86E850200              call 004F40FC
  1054. :004CBB8E 6A00                    push 00000000
  1055. :004CBB90 8D45F0                  lea eax, [ebp-10]
  1056. :004CBB93 50                      push eax
  1057. :004CBB94 8D4DF8                  lea ecx, [ebp-08]
  1058. :004CBB97 6A04                    push 00000004
  1059. :004CBB99 8B55FC                  mov edx, [ebp-04]
  1060. :004CBB9C 51                      push ecx
  1061. :004CBB9D 52                      push edx
  1062. :004CBB9E FF1590005D00            Call dword ptr [005D0090];ReadFile
  1063. :004CBBA4 85C0                    test eax, eax
  1064. :004CBBA6 7406                    je 004CBBAE
  1065. :004CBBA8 837DF004                cmp [ebp-10], 00000004
  1066. :004CBBAC 7407                    je 004CBBB5
  1067. :004CBBAE 6A03                    push 00000003
  1068. :004CBBB0 E847850200              call 004F40FC
  1069. :004CBBB5 8B45FC                  mov eax, [ebp-04]
  1070. :004CBBB8 50                      push eax
  1071. :004CBBB9 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1072. :004CBBBF C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1073. :004CBBC6 817DF86F6C626F          cmp [ebp-08], 6F626C6F
  1074. :004CBBCD 0F85C2000000            jne 004CBC95
  1075. :004CBBD3 6A00                    push 00000000
  1076. :004CBBD5 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1077. :004CBBDB 6880000000              push 00000080
  1078. :004CBBE0 6A03                    push 00000003
  1079. :004CBBE2 6A00                    push 00000000
  1080. :004CBBE4 6A00                    push 00000000
  1081. :004CBBE6 68000000C0              push C0000000
  1082. :004CBBEB 50                      push eax
  1083. :004CBBEC FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1084. :004CBBF2 8945FC                  mov [ebp-04], eax
  1085. :004CBBF5 83F8FF                  cmp eax, FFFFFFFF
  1086. :004CBBF8 7507                    jne 004CBC01
  1087. :004CBBFA 6AFE                    push FFFFFFFE
  1088. :004CBBFC E8FB840200              call 004F40FC
  1089. :004CBC01 8D45AC                  lea eax, [ebp-54]
  1090. :004CBC04 8D4DB4                  lea ecx, [ebp-4C]
  1091. :004CBC07 50                      push eax
  1092. :004CBC08 8D55BC                  lea edx, [ebp-44]
  1093. :004CBC0B 51                      push ecx
  1094. :004CBC0C 8B45FC                  mov eax, [ebp-04]
  1095. :004CBC0F 52                      push edx
  1096. :004CBC10 50                      push eax
  1097. :004CBC11 FF1594005D00   ****Call dword ptr [005D0094];GetFileTime ***
  1098. :004CBC17 85C0                    test eax, eax
  1099. :004CBC19 7507                    jne 004CBC22
  1100. :004CBC1B 6A03                    push 00000003
  1101. :004CBC1D E8DA840200              call 004F40FC
  1102. :004CBC22 6A00                    push 00000000
  1103. :004CBC24 8B45FC                  mov eax, [ebp-04]
  1104. :004CBC27 6A00                    push 00000000
  1105. :004CBC29 6850D90100              push 0001D950
  1106. :004CBC2E 50                      push eax
  1107. :004CBC2F FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1108. :004CBC35 83F8FF                  cmp eax, FFFFFFFF
  1109. :004CBC38 7507                    jne 004CBC41
  1110. :004CBC3A 6AE7                    push FFFFFFE7
  1111. :004CBC3C E8BB840200              call 004F40FC
  1112. :004CBC41 6A00                    push 00000000
  1113. :004CBC43 8D45F0                  lea eax, [ebp-10]
  1114. :004CBC46 50                      push eax
  1115. :004CBC47 8D4DF4                  lea ecx, [ebp-0C]
  1116. :004CBC4A 6A04                    push 00000004
  1117. :004CBC4C 8B55FC                  mov edx, [ebp-04]
  1118. :004CBC4F 51                      push ecx
  1119. :004CBC50 52                      push edx
  1120. :004CBC51 FF1530015D00            Call dword ptr [005D0130];WriteFile
  1121. :004CBC57 85C0                    test eax, eax
  1122. :004CBC59 7406                    je 004CBC61
  1123. :004CBC5B 837DF004                cmp [ebp-10], 00000004
  1124. :004CBC5F 7407                    je 004CBC68
  1125. :004CBC61 6A03                    push 00000003
  1126. :004CBC63 E894840200              call 004F40FC
  1127. :004CBC68 8D45AC                  lea eax, [ebp-54]
  1128. :004CBC6B 8D4DB4                  lea ecx, [ebp-4C]
  1129. :004CBC6E 50                      push eax
  1130. :004CBC6F 8D55BC                  lea edx, [ebp-44]
  1131. :004CBC72 51                      push ecx
  1132. :004CBC73 8B45FC                  mov eax, [ebp-04]
  1133. :004CBC76 52                      push edx
  1134. :004CBC77 50                      push eax
  1135. :004CBC78 FF159C005D00    ***Call dword ptr [005D009C];SetFileTime **
  1136. :004CBC7E 8B4DFC                  mov ecx, [ebp-04]
  1137. :004CBC81 51                      push ecx
  1138. :004CBC82 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1139. :004CBC88 C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1140. :004CBC8F 8B4DF4                  mov ecx, [ebp-0C]
  1141. :004CBC92 894DF8                  mov [ebp-08], ecx
  1142. :004CBC95 817DF80100ADDE          cmp [ebp-08], DEAD0001
  1143. :004CBC9C 0F8408010000            je 004CBDAA
  1144. :004CBCA2 8B45F8                  mov eax, [ebp-08]
  1145. :004CBCA5 3945F4                  cmp [ebp-0C], eax
  1146. :004CBCA8 7248                    jb 004CBCF2
  1147. :004CBCAA 8B45F4                  mov eax, [ebp-0C]
  1148. :004CBCAD B980510100              mov ecx, 00015180
  1149. :004CBCB2 2B45F8                  sub eax, [ebp-08]
  1150. :004CBCB5 2BD2                    sub edx, edx
  1151. :004CBCB7 F7F1                    div ecx
  1152. :004CBCB9 83F83C                  cmp eax, 0000003C
  1153. :004CBCBC 7334                    jnb 004CBCF2
  1154. :004CBCBE B93C000000              mov ecx, 0000003C
  1155. :004CBCC3 2BC8                    sub ecx, eax
  1156. :004CBCC5 894DC4                  mov [ebp-3C], ecx
  1157. :004CBCC8 8D4DC4                  lea ecx, [ebp-3C]
  1158. :004CBCCB 51                      push ecx
  1159. :004CBCCC 683E040000              push 0000043E
  1160. :004CBCD1 E85C810200              call 004F3E32
  1161. :004CBCD6 B801000000              mov eax, 00000001
  1162. :004CBCDB C705D0225C0000000000    mov dword ptr [005C22D0],0
  1163. :004CBCE5 5F                      pop edi
  1164. :004CBCE6 5E                      pop esi
  1165. :004CBCE7 8BE5                    mov esp, ebp
  1166. :004CBCE9 832DD4225C0040          sub dword ptr [005C22D4],40
  1167. :004CBCF0 5D                      pop ebp
  1168. :004CBCF1 C3                      ret
  1169.  
  1170. :004CBCF2 817DF80100ADDE          cmp [ebp-08], DEAD0001
  1171. :004CBCF9 0F84AB000000            je 004CBDAA
  1172. :004CBCFF 6A00                    push 00000000
  1173. :004CBD01 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1174. :004CBD07 6880000000              push 00000080
  1175. :004CBD0C 6A03                    push 00000003
  1176. :004CBD0E 6A00                    push 00000000
  1177. :004CBD10 6A00                    push 00000000
  1178. :004CBD12 68000000C0              push C0000000
  1179. :004CBD17 50                      push eax
  1180. :004CBD18 FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1181. :004CBD1E 8945FC                  mov [ebp-04], eax
  1182. :004CBD21 83F8FF                  cmp eax, FFFFFFFF
  1183. :004CBD24 0F8480000000            je 004CBDAA
  1184. :004CBD2A 8D45CC                  lea eax, [ebp-34]
  1185. :004CBD2D 8D4DD4                  lea ecx, [ebp-2C]
  1186. :004CBD30 50                      push eax
  1187. :004CBD31 8D55DC                  lea edx, [ebp-24]
  1188. :004CBD34 51                      push ecx
  1189. :004CBD35 8B45FC                  mov eax, [ebp-04]
  1190. :004CBD38 52                      push edx
  1191. :004CBD39 50                      push eax
  1192. :004CBD3A FF1594005D00  *** Call dword ptr [005D0094];GetFileTime **
  1193. :004CBD40 85C0                    test eax, eax
  1194. :004CBD42 7455                    je 004CBD99
  1195. :004CBD44 6A00                    push 00000000
  1196. :004CBD46 8B45FC                  mov eax, [ebp-04]
  1197. :004CBD49 6A00                    push 00000000
  1198. :004CBD4B 6850D90100              push 0001D950
  1199. :004CBD50 50                      push eax
  1200. :004CBD51 FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1201. :004CBD57 83F8FF                  cmp eax, FFFFFFFF
  1202. :004CBD5A 743D                    je 004CBD99
  1203. :004CBD5C 6A00                    push 00000000
  1204. :004CBD5E 8D45F0                  lea eax, [ebp-10]
  1205. :004CBD61 50                      push eax
  1206. :004CBD62 8D4DE8                  lea ecx, [ebp-18]
  1207. :004CBD65 6A04                    push 00000004
  1208. :004CBD67 8B55FC                  mov edx, [ebp-04]
  1209. :004CBD6A C745E80100ADDE          mov [ebp-18], DEAD0001
  1210. :004CBD71 51                      push ecx
  1211. :004CBD72 52                      push edx
  1212. :004CBD73 FF1530015D00            Call dword ptr [005D0130];WriteFile
  1213. :004CBD79 85C0                    test eax, eax
  1214. :004CBD7B 741C                    je 004CBD99
  1215. :004CBD7D 837DF004                cmp [ebp-10], 00000004
  1216. :004CBD81 7516                    jne 004CBD99
  1217. :004CBD83 8D45CC                  lea eax, [ebp-34]
  1218. :004CBD86 8D4DD4                  lea ecx, [ebp-2C]
  1219. :004CBD89 50                      push eax
  1220. :004CBD8A 8D55DC                  lea edx, [ebp-24]
  1221. :004CBD8D 51                      push ecx
  1222. :004CBD8E 8B45FC                  mov eax, [ebp-04]
  1223. :004CBD91 52                      push edx
  1224. :004CBD92 50                      push eax
  1225. :004CBD93 FF159C005D00   ***Call dword ptr [005D009C];SetFileTime **
  1226. :004CBD99 8B45FC                  mov eax, [ebp-04]
  1227. :004CBD9C 50                      push eax
  1228. :004CBD9D FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1229. :004CBDA3 C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1230. :004CBDAA 683D040000              push 0000043D
  1231. :004CBDAF E81E800200              call 004F3DD2
  1232. :004CBDB4 33C0                    xor eax, eax
  1233. :004CBDB6 E920FFFFFF              jmp 004CBCDB
  1234. :004CBDBB 837DFC00                cmp [ebp-04], 00000000
  1235. :004CBDBF 740A                    je 004CBDCB
  1236. :004CBDC1 8B45FC                  mov eax, [ebp-04]
  1237. :004CBDC4 50                      push eax
  1238. :004CBDC5 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1239. :004CBDCB 683F040000              push 0000043F
  1240. :004CBDD0 E8FD7F0200              call 004F3DD2
  1241. :004CBDD5 33C0                    xor eax, eax
  1242. :004CBDD7 5F                      pop edi
  1243. :004CBDD8 5E                      pop esi
  1244. :004CBDD9 8BE5                    mov esp, ebp
  1245. :004CBDDB 5D                      pop ebp
  1246. :004CBDDC C3                      ret
  1247.  
  1248. OK, that's enough dead listing for now... we know now that the
  1249. REAL protection may call :004CBA50 (the beginning of the huge
  1250. code snippet above with GetFileTime and other file opening and
  1251. closing goodies)... and wdasm gives us the caller (only one...
  1252. THE TARGET!... don't you feel it?)
  1253.  
  1254. :004C8843   ;This is the call that triggers everything
  1255.           ;I told you: DO NOT FORGET IT
  1256. :004CBA50 55                      push ebp
  1257. :...                          ...and the rest of the huge snippet
  1258.  
  1259. Therefore let's have a look at the caller... here it is:
  1260.    :call_the_time_checking_huge_snippet
  1261. :004C8843 E808320000              call 004CBA50 ;call time checks
  1262. :004C8848 85C0                    test eax, eax ;on non zero
  1263. :004C884A 7507                    jne 004C8853  ;go go_on
  1264. :004C884C 6A0D                    push 0000000D ;do not push
  1265. :004C884E E8A9B80200              call 004F40FC ;do not call here
  1266.   :go_on
  1267. :004C8853 E8CC1D0500              call 0051A624 ;continue here
  1268. :004C8858 8B4510                  mov eax, [ebp+10]
  1269. :004C885B 50                      push eax
  1270. :004C885C E8298DF7FF              call 0044158A
  1271. :004C8861 F60540F15C0008          test byte ptr [005CF140], 08
  1272. :004C8868 0F84BC010000            je 004C8A2A
  1273. :004C886E C7451400000000          mov [ebp+14], 00000000
  1274.  
  1275. Therefore the crack is clear
  1276. ** how to crack MSPublisher97 (trial 60 days), by +ORC, April
  1277. 1997**
  1278. If you have NOT already sprenged MSpublisher time protection
  1279. search for
  1280. :004C8843 E808320000       call 004CBA50 ;trigger time checks
  1281. and change it to
  1282. :004C8843 E910000000       jmp 004C8853 ;don't trigger
  1283.  
  1284. If you  DO have already sprenged MSpublisher time protection
  1285. FIRST search for
  1286. :004C8843 E808320000      call 004CBA50 ;trigger time checks
  1287. and change it to
  1288. :004C8843 E910000000      jmp 004C8853  ;don't trigger
  1289. THEN search for
  1290. :004F4103 EB09            jmp 004F410E  ;jmp anyway
  1291. and change it to
  1292. :004F4103 7509            jne 004F410E  ;jne
  1293. THEN search for
  1294. :004F410C EB06            jmp 004F4114  ;jmp anyway
  1295. and change it to
  1296. :004F410C 7506            jne 004F4114  ;jne
  1297. **********************************************************
  1298.  
  1299. LET'S CRACK MICROSOFT'S MONEY 97 and 95 NOW
  1300. Let's finish this lesson with another sound hit at Micro$oft.
  1301. This is the main part of the strainer to next year's +HCU, please
  1302. solve it (it's MUCH more easy than last year's strainer).
  1303. I'm cracking here Microsoft MONEY 97, 90 days trial version I
  1304. found on the cd-cover of a review called PC-PRO, issue 31, MAY
  1305. 1997 (but I bought it in transit at Heathrow airport for three
  1306. pounds at the beginning of April and not in May, as usual in this
  1307. awful commerce oriented society event minutiae like the dates of
  1308. the issues of magazines are completely false :=(
  1309. This is another kind of program I personally would not touch with
  1310. a pole, nor would I use it, even if somebody would pay me for
  1311. it... but I know that a lotta suckers buy  these ridiculous
  1312. applications greedly... such kind of customers do pay a lot of
  1313. money to Micro$oft... and to the banks, and to the various
  1314. asinine "investor advisors", and to all the awful commercial
  1315. people that has given us this grey world of unhappiness, and
  1316. inequality, where only irrelevance and bad taste are valued,
  1317. where knowledge is "allowed" only and only if it helps them to
  1318. make more money (not happiness)... where poetry and feelings are
  1319. considered useless and obsolete by the "market forces"... My, how
  1320. I hate cheerfully this whole bunch of "market operators"! How I
  1321. hope that the people they have enslaved will one day hang the
  1322. whole lot of them, pinning the the TV-news moderators to the
  1323. doors of the TV-studios by their tongue as a good collateral
  1324. measure... (the sooner this happens the better, give it a move
  1325. please, I would like to take some nice photos of the hanging
  1326. bodies),... ok, enough, let's crack first of all the programs
  1327. used by this outrageous people, hoping that my crackings will
  1328. spread enough to diminish Gates' cashflow a little...  a pebble
  1329. of sand is nothing less than a pebble of sand, after all, let's
  1330. never forget it :=)
  1331.  
  1332. Let's see what happens here... once more with GetLocalTime? Let's
  1333. see... here you have three calling "points" for GetLocalTime:
  1334. at 45804D, at 46A308 and at 5DA056, let's call them 45, 46 and
  1335. 5D. Since the one at 46 is referenced by not less than 80 calls,
  1336. we will  deem it more important than the first one at 45 (three
  1337. calls) and the third one at 5D (two calls).... but wait...
  1338.  
  1339. WAIT, HISTORY IS IMPORTANT
  1340.      But wait...may be we should delve a little deeper in
  1341. Micro$oft's protection strategies, may be you should  have FIRST
  1342. a look at an OLDER copy of Micro$oft's Money... say version 
  1343. 3.00p of February 1994... the file you have to crack is here
  1344. MNYDEMO.EXE, length 1.173.184 bytes, from 8/2/1994... I found it
  1345. on a old cd-rom: PCHOME n.8 from June 1994, as usual, quite a lot
  1346. of magazines will have had the "privilege" of burning this trial
  1347. version on their CD-ROMs during that summer... you should be able
  1348. to find a copy of it on the Web too, if you happen to know how
  1349. to search and, what's even more important, WHERE to search... as
  1350. I said elsewhere, on the Web you can find almost everything...
  1351. provided you already know where it is :=) 
  1352.  
  1353. THE STRAINER... FIRST OF ALL YOU'LL HAVE TO FIND IT!
  1354.      Anyway, since this lesson is intended as a "strainer" for
  1355. next years +HCU, a part of your duty is TO FIND the targets we
  1356. have to crack... this will be easy for MS MONEY 97, but (I hope)
  1357. not so easy for MS MONEY from 1994... believe me, this searching
  1358. is  a very important art... you may be just lucky, or already
  1359. have (like me) a huge collection of many CD-ROM that appeared on
  1360. magazines covers and that you bought at discount prices... or you
  1361. may have to beg or implore or exchange programs with some old guy
  1362. from New Zealand or a weird wannaby warez dude from Corea, which
  1363. happens to have the copy you are interested in... you may have
  1364. to examine old usenet discussion groups, to peruse old
  1365. PC-magazines... to delve inside a lot of useless pages...
  1366. searching for your nugget. But you'll gain a lot of knowledges
  1367. in this process...  ignorantia est carentia scientiae debitae.
  1368.  
  1369. OLD VERSION, SAME LIMITATIONS
  1370.      The "trial" old demo of MS-Money 94 has an analogous
  1371. protection scheme to  the very recent MONEY '97 trial version?
  1372. Please check... if it is so, that would be VERY important for
  1373. us... history and evolution of  a targets' protections IS  INDEED
  1374. very important. If you'll delve inside cracking as an art, as I
  1375. would like you to, you'll see that patterns and trends play (like
  1376. in  real life) a tremendous unproportionated role... protections
  1377. mirror our society (at times I believe that everything does, but
  1378. me): real knowledge and innovation plays almost no role, stupid
  1379. "trends" and repetitions of the same boring schemes do actually
  1380. make the 99% of the "reality". 
  1381.      In the meantime life keep worsening for the stupid slaves,
  1382. more and more useless stinking cars are polluting our cities and
  1383. the "new" programs we buy are slower  and by far not as good and
  1384. powerful as the old DOS programs of 1990... a proof? For the dead
  1385. listing of this target you'll NOT be able to use Word 7.0 ("file
  1386. is too huge"), but you'll still be able to use Word 2.0 from
  1387. 1994... funny, isn't it?
  1388.      This old "trial" demo of MS-Money has THREE levels of
  1389. protection:
  1390. 1)   The system date in your computer must be 1994 or 1995
  1391. 2)   There is a Cinderella 60 days limit (Micro$oft was not yet
  1392. a "90 days" enterprise... we are watching here the BIRTH of this
  1393. MS-protection scheme :=) 
  1394. 3)   Transactions (i.e. fields of this database) can only be
  1395. entered within a 60-days period (this is at the same part the
  1396. "tricky" part of this crack and a key to the crack :=)
  1397.  
  1398. HOW DO YOU BEGIN?
  1399. I'm writing this to teach you MANY cracking techniques, let's
  1400. pack this target from another direction, let's forget winice for
  1401. a while and use a bit of "dead listing", a program like winsight
  1402. and some of the brain we are supposed to have:
  1403. 1)   Have a look at the messages i.e.:
  1404.  install our target...
  1405. run it as it should, changing the OS date to 1994
  1406. change OS date past the 60 days limit
  1407. look at the message ("The 60-days limit of this working model..."
  1408. 2)   Fire Borland's Winsight (I'm using here version 1.30 from
  1409. an old cracked Delphi, but you'll find hundred of them on the
  1410. web) It will describe you EXACTLY the nagwindow you have on your
  1411. screen:
  1412. Popup 0610 {#32770:Dialog} mnydemo.exe (144,183)-(523,345)"Notice of Expiration"
  1413. You may even get details on this Popup 610, if you feel like it.
  1414. 4)   You have the NAME (very important). Search it inside the
  1415. dead listing (you have previously made with WCB or with wdasm)
  1416. of MNYDEMO.EXE, you'll get the following:
  1417.  
  1418. Name: 
  1419. DialogID_0494, # of Controls=004, Caption:"Notice of Expiration"
  1420. 001 - ControlID:02CE, Control Class:"" Control Text:"The 60-day
  1421. limit of this working model has expired." 
  1422.  
  1423. See what's important? ID_0494... that's important.
  1424.  
  1425. 5) Now search ID_0494 in your dead listing... you'll find THREE
  1426. occurrences (i.e. they call three time the 60-days limit) let's
  1427. examine them (with context):
  1428. Block 6 at 263:
  1429. 6.263 is called "cascade" (switch) from the beginning of block 6:
  1430.  
  1431. :0006.0012 57                     push di
  1432. :0006.0013 6A00                   push 0000
  1433. :0006.0015 9AFFFF0000             call USER.GETWINDOWWORD
  1434.       (GETWINDOWWORD returns a 16-bit WORD value from the extra
  1435.        info associated with a  window. Push handle and index (in 
  1436.        bytes) in the extra memory where the value will be found)
  1437. :0006.001A 8BF0                   mov si, ax
  1438. :0006.001C 8B460C                 mov ax, [bp+0C]
  1439. :0006.001F 3DA100                 cmp ax, 00A1 ;is it 161?
  1440. :0006.0022 7503                   jne 0027 ;may call NoE if not
  1441. ...
  1442. :0006.0027 7729                   ja 0052  ;may call NoE if more
  1443. ...
  1444. :0006.0052 3D1501                 cmp ax, 0115
  1445. :0006.0055 7503                   jne 005A ;if not 115
  1446. ...
  1447. :0006.005A 7712                   ja 006E ;more? Call NoE
  1448. ...
  1449. :0006.006E 2D0102                 sub ax, 0201 ;sub 201
  1450. :0006.0071 7503                   jne 0076 ;may call NoE
  1451. ...
  1452. :0006.0076 48                     dec ax   ;-1
  1453. :0006.0077 48                     dec ax   ;-1
  1454. :0006.0078 7503                   jne 007D ;may call NoE
  1455. ...
  1456. :0006.007D 2D9102                 sub ax, 0291  ;sub 291
  1457. :0006.0080 7503                   jne 0085 ;do not call NoE
  1458. :0006.0082 E9D701                 jmp 025C ;call NoE ******
  1459. ...
  1460. :0006.025C 57                     push di
  1461. :0006.025D 9AFFFF0000             call USER.GETPARENT
  1462.       (This returns the handle to a window's parent. Function
  1463.        returns window's parent handle if successful and NULL if
  1464.        no parent or error)
  1465.  
  1466. * Possible Reference to Dialog: DialogID_0494 
  1467.                                   |
  1468. :0006.0263 689404        push 0494  ;HERE! NOTICE OF EXPIRATION
  1469. :0006.0266 FF760A        push word ptr [bp+0A]
  1470. :0006.0269 FF7608        push word ptr [bp+08]
  1471. :0006.026C FF7606        push word ptr [bp+06]
  1472. :0006.026F 9AFFFF0000    call USER.SENDMESSAGE ;bagger off, bad guy!
  1473. :0006.0274 EB14          jmp 028A
  1474.  
  1475. Ok, for block 6 what should we say?  Can we start our crack from
  1476. here?
  1477.  
  1478. Let's have a look at the next block:
  1479. Block 8 at 17D2:
  1480.  
  1481. :0008.17CA 8B46F4                 mov ax, [bp-0C]
  1482. :0008.17CD 3946F0                 cmp [bp-10], ax
  1483. :0008.17D0 7246                   jb 1818
  1484.  
  1485. * Possible Reference to Dialog: DialogID_0494 
  1486.                                   |
  1487. :0008.17D2 689404                 push 0494 ;HERE! NOTICE OF EXPIRATION
  1488. :0008.17D5 685505                 push SEG ADDR of Segment 0028
  1489. :0008.17D8 684C15                 push 154C
  1490. :0008.17DB FF362C0A               push word ptr [0A2C]
  1491. :0008.17DF 6A00                   push 0000
  1492. :0008.17E1 6A00                   push 0000
  1493. :0008.17E3 6A00                   push 0000
  1494. :0008.17E5 9A34019911             call 0005.0134 ;call KERNEL.MAKEPROCINSTANCE
  1495.   that's the check for all open windows (Useless with 32 bit)
  1496.  
  1497. And, please, what do we have at 28.154C?
  1498. Exported fn(): DLGPROCDEMO - Ord:0019h
  1499. :0028.154C 8CD8                   mov ax, ds
  1500. :0028.154E 90                     nop (always suspect these
  1501.           funny nops, somebody patched here?... :=)
  1502. :0028.154F 45                     inc bp
  1503. :0028.1550 55                     push bp
  1504. :0028.1551 8BEC                   mov bp, sp
  1505. :0028.1553 1E                     push ds
  1506. :0028.1554 8ED8                   mov ds, ax
  1507. :0028.1556 83EC02                 sub sp, 0002
  1508. :0028.1559 56                     push si
  1509. :0028.155A 8B4E0C                 mov cx, [bp+0C] ;fetch bp+C
  1510. :0028.155D 8BC1                   mov ax, cx
  1511. :0028.155F 2D0F00                 sub ax, 000F  
  1512. :0028.1562 740E                   je 1572         ;was it 15?
  1513. :0028.1564 2D0101                 sub ax, 0101    ;was it 272?
  1514. :0028.1567 7425                   je 158E
  1515. :0028.1569 48                     dec ax
  1516. :0028.156A 7454                   je 15C0         ;273?
  1517. :0028.156C 33C0                   xor ax, ax
  1518. :0028.156E E98900                 jmp 15FA
  1519.  
  1520.  
  1521. A jump below followed by a switch tree... is it interesting for
  1522. us? You'll answer!
  1523. Finally, let's have a look at the THIRD and last occurrence of 
  1524. our "Notice of expirations" at block 52 at 2465:
  1525.  
  1526. * Possible Ref to Menu: MAINMENU, Item: "Future Transactions"
  1527.                                   |
  1528. :0052.2449 6A02                   push 0002
  1529. :0052.244B 9AE00ED424             call 0006.0EE0
  1530. :0052.2450 837EF800               cmp word ptr [bp-08], 0000
  1531. :0052.2454 7503                   jne 2459
  1532. :0052.2456 E9CE00                 jmp 2527
  1533.  
  1534. :0052.2459 8B5EFC                 mov bx, [bp-04]
  1535. :0052.245C FF7718                 push word ptr [bx+18]
  1536. :0052.245F 9AFFFF0000             call USER.GETPARENT
  1537. :0052.2464 50                     push ax
  1538. * Possible Reference to Dialog: DialogID_0494 
  1539.                                   |
  1540. :0052.2465 689404                 push 0494 ;HERE! NOTICE OF EXPIRATION
  1541.  
  1542. * Possible Ref to Menu: MAINMENU, Item: "Account Book"
  1543.                                   |
  1544. :0052.2468 6A01                   push 0001
  1545. :0052.246A 6A00                   push 0000
  1546. :0052.246C 6A00                   push 0000
  1547. :0052.246E 9A1B250000             call USER.SENDMESSAGE
  1548.  
  1549.  
  1550. Well, I think this is enough:
  1551. The crack for it is pretty obvious, is it?
  1552.  
  1553. Let's start with a simple substitution:
  1554. instead of
  1555. :0008.17D0 7246            jb 1818
  1556. let's have
  1557. :0008.17D0 55              push bp
  1558. :0008.17D0 5D              pop bp
  1559. (nooping it)
  1560.  
  1561. That's it, folk!...  but, wait... all this DOES NOT work
  1562. correctly... did I forgot something?
  1563. THAT's the Strainer! Solve it (you have time until SEPTEBER 1997).
  1564.  
  1565. THE STRAINER: SOLVE IT
  1566. You want to be a +HCUker? SOLVE the crack for MS-Money (old
  1567. version and new version), I want to get from you (directly to
  1568. na526164@anon.penet.fi if it still works or else through channel
  1569. you have to find yourself)
  1570. 1)   The complete and WELL described crack to MSMONEY version 3 (1994)
  1571.      (60 days trial protection)
  1572. 2)   The complete and WELL described crack to MSMONEY 97 (1997)
  1573.      (90 days trial protection)
  1574. 3)   The reason for the crack I used for Winproject instead of
  1575. nooping the alternative location... which would have seen more
  1576. obvious at first glance.
  1577.  
  1578.      I would like you (since these cracks are alltogether much
  1579. more easy than the Instant access strainer we used last year) to
  1580. DELVE DEEP inside the date-encryption routines of these programs,
  1581. explaining them perfectly.
  1582.      Please use a language that newbyes can easily follow... I
  1583. do not intend to work in order to re-explain once more things you
  1584. should have explained well in the first time.
  1585.      Best protection busters (and best approaches) will enter the
  1586. +HCU. Lamers and people that have copied from other will be left
  1587. out.
  1588.      +HCU 1998 will begin on 1 Januar 1998. The above solutions
  1589. must be sent to me BEFORE september 1997. Should anon.penet die,
  1590. I'll reopen another anonymous channel end August.
  1591.  
  1592. Well, that's it for this lesson, reader. Not all lessons of my
  1593. tutorial are or will be on the Web.
  1594.      You'll obtain the missing lessons IF AND ONLY IF you mail
  1595. me back (via anon.penet.fi) with some tricks of the trade I may
  1596. not know that YOU discovered. Mostly I'll actually know them
  1597. already, but if they are really new you'll be given full credit,
  1598. and even if they are not, should I judge that you "rediscovered"
  1599. them with your work, or that you actually did good work on them,
  1600. I'll send you the remaining lessons nevertheless. Your
  1601. suggestions and critics on the whole crap I wrote are also
  1602. welcomed. Do not annoy me with requests for warez, everything is
  1603. on the Web, learn how to search, for Hiawatha sake.
  1604.  
  1605.      "If you give a man a crack he'll be hungry again
  1606.      tomorrow, but if you teach him how to crack, he'll
  1607.      never be hungry again"
  1608.